package com.imu.purse.modules.trade.service;

import com.imu.common.utils.R;
import com.imu.purse.modules.trade.entity.TradeLogEntity;
import com.imu.purse.modules.trade.form.ConversionForm;
import com.imu.purse.modules.trade.form.ExchangeForm;

import java.util.List;

/**
 * 交易流水
 * @author sunhongwei
 * @email sunhongwei@jshijian.com
 * @date 2018-03-22 10:33:21
 * Copyright (c) 2017 武汉极时间科技有限公司 版权所有 
 * Jshijian aloha CO.,LTD. All Rights Reserved. 
 */
public interface TradeLogService 
{
	/****
	 * 插入交易流水
	 * @param tradeLog
 	 * @date 2018-03-22 10:33:21
	 * @return
	 */
    public int save(final TradeLogEntity tradeLog);
    
    /****
	 * 删除交易流水
	 * @param ids
 	 * @date 2018-03-22 10:33:21
	 * @return
	 */
    public boolean delete(final String ...ids);
    
    /****
	 * 修改交易流水
	 * @param tradeLog
 	 * @date 2018-03-22 10:33:21
	 * @return
	 */
    public int update(final TradeLogEntity tradeLog);
    
     /****
	 * 插入或跟新交易流水
	 * @param tradeLog
 	 * @date 2018-03-22 10:33:21
	 * @return
	 */
    public int saveUpdate(final TradeLogEntity tradeLog);
    
    /****
	 * 根据ID查询交易流水
	 * @param id
 	 * @date 2018-03-22 10:33:21
	 * @return
	 */
    public TradeLogEntity findById(final Long id);
    
    /****
   	 * 分页查询交易流水
	 * @param tradeLog
 	 * @date 2018-03-22 10:33:21
   	 * @return
   	 */
    public List<TradeLogEntity> queryList(final TradeLogEntity tradeLog);
    
    /****
   	 * 合营兑换imu和GET
   	 * @param id
    	 * @date 2018-03-22 10:33:21
   	 * @return
   	 */
	 public R conversion(final ConversionForm form, final  Long id,String sign);

	/****
	 * 合营分兑换GET和贝壳
	 * @param id
	 * @date 2018-03-22 10:33:21
	 * @return
	 */
	public R exchange(final ExchangeForm form, final  Long id, String sign);

	public int checkConvsion(String orderNo,Long id);
}
